import java.util.Scanner;

public class Score {
    public static void main(String[] args) {
        float score;
        float sum = 0;
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入五个学生的成绩：");
        for (int i = 0; i < 5; i++) {
            score = scanner.nextFloat();
            if(score > 100||score<0){
                System.out.println("你输入的成绩无效");
                i--;
            }else{
                sum += score;
            }
        }
        System.out.println("成绩之和:"+sum);
        System.out.println("平均成绩："+sum / 5);
    }
}
